package cn.yunhe.controller;

import cn.yunhe.dao.CustomerDao;
import cn.yunhe.daoImpl.CustomerDaoImpl;
import cn.yunhe.entity.Customer;

public class CustomerAction extends BaseAction {

	private static final long serialVersionUID = 1L;

	private Customer customer;
	private String repwd;

	CustomerDao customerDao = new CustomerDaoImpl();
	
	public String login(){
		Customer cus = customerDao.loginCustomer(customer);
		if(cus != null){
			getMapSession().put("username", cus.getUsername());
		}
		return customerDao.loginCustomer(customer) != null ? SUCCESS : INPUT;
	}
	
	public Customer getCustomer() {
		return customer;
	}

	public void setCustomer(Customer customer) {
		this.customer = customer;
	}

	public String getRepwd() {
		return repwd;
	}

	public void setRepwd(String repwd) {
		this.repwd = repwd;
	}

}
